PHP installation of GeoIP extension based on the IP address to obtain the geographic location and calculation distance method, geoip geographic location
Obtain the visitor's country, city, and latitude and longitude Based on the IP addressInstall GeoIP extension:
sudo apt-get install libgeoip-dev
pecl install geoip-1.1
Traceroute command, tracerouteWith traceroute, we can know the path from your computer to the host on the other end of the Internet. Of course, the path for each packet to arrive at the same destination from a certain source may be different, however, most of the time the routes are the same. In linux, traceroute is called tracert in MS Windows.
Recently installed Nginx Geo module in the compilation of Nginx encountered an error, error information as follows:Checking for OpenSSL Library ... foundchecking for zlib library ... foundchecking for GeoIP library ... not foundchecking For GeoIP library in/usr/local/... not foundchecking for GeoIP library in/usr/pkg/... not foundchecking for
Mtr (My traceroute) is a Network Diagnostics tool that incorporates ping and traceroute into a program. The MTR provides two interfaces: a ncurses interface that is useful for using MTR from a Telnet session, and a GTK + interface for X (provided in the MTR-GTK software package).MTR use1, MTR command line toolsMTR use is relatively simple, please refer to MTR's man page for detailed usage.[root@ts3-142 ~]#
Recently there is a Web site project requirements: the need to block domestic requests. Take the time to study the information in this area. The best way to find it now is to use the Nginx GeoIP module to realize the region's identification. Then configure the relevant country's ISO name and prohibit access. Record the relevant process.
Compiling GEOIP components
Maxmind provides a free version of the dat
reasons for using the GeoIP module (why): Requests are forwarded to customers in different cities for the needs of the project, eg:When Tianjin User A visited www.XXXX.com, Nginx forwarded this request to the Tianjin server and the domain name of Tianjin, the browser automatically jump tj.XXXX.comWhen Guangzhou User B visited www.XXXX.com, Nginx forwarded this request to the server in Guangzhou and the domain name of Guangzhou, the browser automatical
GeoIP introduction:What is GepIP?
GeoIP is used to locate the geographical longitude and latitude of a visitor, country/region, province/city, or even Street. The technology here is not difficult. The key is to have a precise database. With accurate data sources, you can earn a small amount of money for odd goods. However, it is our pursuit to promote the spirit of cooperation and make a collective contribu
This article mainly introduces the use of GeoIP Library instances in php. This article provides code instances subdivided into countries and cities, for more information, see maxmind, which is the provider of the geoip database,
Sample and api instructions in many languages are also provided.
For example, php and php's geoip library are quite different, including
GeoIP Introduction:What is GEPIP?
The so-called GeoIP, is through the visitor's IP, positioning his latitude and longitude, country/region, provinces and cities, and even streets and other location information. The technology is not a problem, the key is to have a precise database. With accurate data sources on the enjoy high earn a little money, but to carry forward the spirit of cooperation, collective co
GeoIP Introduction:What is GEPIP?
The so-called GeoIP, is through the visitor's IP, positioning his latitude and longitude, country/region, provinces and cities, and even streets and other location information. The technology is not a problem, the key is to have a precise database. With accurate data sources on the enjoy high earn a little money, but to carry forward the spirit of cooperation, collective co
GeoIP PHP extension installation and configuration, geoipphp Extension Configuration
Author: zhanhailiang Date:
1. Install GeoIP-devel and GeoIP Dependencies
GeoIP-devel.x86_64 : Development headers and libraries for GeoIPGeoIP.x86_64 : Library for country/city/organization to IP address or hostname mapping
yum install
GeoIP Introduction:What is GEPIP?
The so-called GeoIP, is through the visitor's IP, positioning his latitude and longitude, country, provinces and cities, and even the location of the street information. The technology is not a problem, the key is to have a precise database. With accurate data sources on the enjoy high earn a little money, but to develop a spirit of cooperation, collective contribution to t
Transferred from: http://www.21andy.com/blog/20100405/1799.html
There are 2 standard methods of using GeoIP
The first method:Download the GeoIP data file first
Wget-c http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gzGunzip GeoIP.dat.gz
Then download GeoIP PHP file, save
How to Use DNS + geoip + nginx + varnish as a world-class CDN
How to use bind, geoip, nginx, and varnish to create your own efficient CDN network?CDN stands for content distrubtion Network, which is a content delivery network. In short, it refers to Server Load balancer in all regions. The concept of a whole region can be national or global. The unified DNS server performs address forwarding and selects the
This article mainly introduces the use of GeoIP Library instances in php. This article provides code instances subdivided into countries and cities, for more information, see maxmind, which is the provider of the geoip database,
Sample and api instructions in many languages are also provided.
For example, php and php's geoip library are quite different, including
) ip addresses is 9.
-K computer-list
Route data packets using the computer list specified by computer-list. The maximum number of ip addresses allowed by consecutive computers to be separated by intermediate gateways (strictly source routes) is 9.
-W timeout
Specify the timeout interval, in milliseconds.
Destination-list
Specify the remote computer to be pinged.
C: //> ping ds.internic.net
Pinging ds.internic.net [192.20.239.132] with 32 bytes of data: (192.20.239.132 his IP address)
Reply from
Configure GeoIP in logstash to parse geographic information, logstashgeoip
The GeoIP database configured in logstash parses the ip address. Here, an open source ip data source is used to analyze the ip address of the client. The official website is here: MAXMIND
DownloadGeoLiteCityDatabase
Wget http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.t
GeoIP + PHP Usage
Method One:
Download GeoIP PHP file Geoip.inc, save as Geoip.inc.php
Http://sjolzy.cn/php/GeoIP/bak/geoip.inc
PHP uses code
Note: If you test locally because $_server[' remote_addr ' and $_server[' REMOTE_ADDR '] may be 127.0.0.1, the output content is empty. Can bring in the IP test yourself
Method Two:
Installing
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.